/**
 * Created by dukes on 2015/9/23.
 */
class EffectConfig{
    public totalFrame:number;
    public currentFrame:number=1;
    public resPath:string;
    public fps:number;
    public playgap:number;
    public posX:number;
    public posY:number;
    public name:string;
    public resPrefix:string;
    public constructor(data:any=null){
        if( data != null)
            this.initFromData(data);
    }
    public initFromData(data:any){
        this.posX = data.pos[0];
        this.posY = data.pos[1];
        this.totalFrame = data.totalFrame;
        this.name = data.name;
        this.resPath = data.res+"_json";
        this.resPrefix = data.res+"_";
        this.fps = data.fps;
        this.playgap = Math.floor(1000/this.fps);
    }
}